<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
      layout:decorate="layout">
<head>
    <title>home</title>
</head>
<body>
<!--<h1 layout:fragment="header">Messages : View all</h1>-->
<div layout:fragment="content">
    <div class="box-header with-border">
        <h3 class="box-title">表彰信息维护</h3>
    </div>
    <!-- /.box-header -->
    <!-- form start -->
    <form class="form-horizontal" role="form">
        <div class="box-body">
            <div class="form-group col-md-4">
                <label for="honor_idNum" class="col-sm-5 control-label">证件号码</label>
                <div class="col-xs-7 no-padding">
                    <input type="text" id="honor_idNum" class="form-control" placeholder="证件号码" name="honor_idNum">
                </div>
            </div>
            <div class="form-group col-md-4">
                <label for="honor_name" class="col-sm-5 control-label">姓名</label>
                <div class="col-xs-7 no-padding">
                    <input type="text" id="honor_name" class="form-control" placeholder="姓名" name="honor_name">
                </div>
            </div>
            <div class="form-group col-md-4">
                <label for="honor_caNum" class="col-sm-5 control-label">资格证书号码</label>
                <div class="col-xs-7 no-padding">
                    <input type="text" id="honor_caNum" class="form-control" placeholder="资格证书号码" name="honor_caNum">
                </div>
            </div>
            <div class="form-group col-md-4">
                <label for="honor_orgName" class="col-sm-5 control-label">机构名称</label>
                <div class="col-xs-7 no-padding">
                    <input type="text" id="honor_orgName" class="form-control" placeholder="机构名称" name="honor_orgName">
                </div>
            </div>
            <div class="form-group col-md-4">
                <label for="honor_date" class="col-sm-5 control-label">时间</label>
                <div class="col-xs-7 no-padding">
                    <input type="date" id="honor_date" class="form-control" placeholder="时间" name="honor_date">
                </div>
            </div>
            <div class="form-group col-md-4">
                <label for="honor_honor" class="col-sm-5 control-label">表彰名称</label>
                <div class="col-xs-7 no-padding">
                    <input type="text" id="honor_honor" class="form-control" placeholder="表彰名称" name="honor_honor">
                </div>
            </div>
            <div class="form-group col-md-4 right-button">
                <button onclick="searchBtn_honor()" type="button" class="btn btn-danger right-button">查询</button>
                <button onclick="import_honor()" type="button" class="btn btn-danger right-button">导入</button>
                <button onclick="output_honor()" type="button" class="btn btn-danger right-button">导出</button>
            </div>
        </div>
    </form>
    <div class="box-body">
        <table id="honor" class="table table-bordered table-striped">
            <thead>
            <tr>
                <th>序号</th>
                <th><input type="checkbox" value="honor_box" onclick="honor_box()"></th>
                <th>姓名</th>
                <th>证件号码</th>
                <th>资格证书号码</th>
                <th>机构名称</th>
                <th>时间</th>
                <th>表彰名称</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody></tbody>
        </table>
    </div>
    <div class="modal" id="myHonor">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span></button>
                    <h3 class="modal-title">修改表彰</h3>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal" id="editHonor">
                        <div class="box-body">
                            <div class="form-group">
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label for="add_idNum2" class="col-sm-3 control-label">证件号码</label>
                                        <div class="col-sm-9">
                                            <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
                                            <input type="text" class="form-control" id="add_idNum2" data-rule="required(证件号码必须填写)" name="id_num" readonly="readonly" placeholder="证件号码">
                                            <input type="hidden" id="id2" name="id">
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label for="add_name2" class="col-sm-3 control-label">姓名</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control" id="add_name2" data-rule="required(姓名必须填写)" name="name" readonly="readonly" placeholder="姓名">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label for="add_caNum2" class="col-sm-3 control-label">资格证书号码</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control" id="add_caNum2" data-rule="required(资格证书号码必须填写)" name="ca_num" readonly="readonly" placeholder="资格证书号码">
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label for="add_orgName2" class="col-sm-3 control-label">机构名称</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control" id="add_orgName2" data-rule="required(机构名称必须填写)" name="org_name" readonly="readonly" placeholder="机构名称">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label for="add_date2" class="col-sm-3 control-label">时间</label>
                                        <div class="col-sm-9">
                                            <input type="date" class="form-control" id="add_date2" data-rule="required(时间必须填写)" name="date" placeholder="时间">
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label for="add_Honor" class="col-sm-3 control-label">表彰名称</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control" id="add_Honor" data-rule="required(表彰名称必须填写)" name="honor" placeholder="表彰名称">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button class="btn btn-primary" onclick="modal_honor_sub()">
                        确认
                    </button>
                    <button class="btn btn-warning" data-dismiss="modal">退出</button>
                </div>
            </div>
        </div><!-- /.modal -->
    </div>
    <div id="honor-modal-form" class="modal" tabindex="-1" aria-hidden="true" style="display: none;">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">×</button>
                    <h4 class="blue bigger">表彰信息导入</h4>
                </div>
                <form action="../../admin/honor/import" id="honorFileForm" method="post" enctype="multipart/form-data">
                    <div class="modal-body">
                        <fieldset>
                            <div class="form-group">
                                <label class="col-sm-3 control-label no-padding-right">导入表彰信息：</label>
                                <div class="">
                                    <input type="file" id="importHonorFile" name="honorFile"/>
                                </div>
                            </div>
                        </fieldset>
                    </div>
                    <div class="modal-footer">
                        <button type="reset" class="btn btn-sm" data-dismiss="modal">
                            <i class="ace-icon fa fa-times"></i>
                            返回
                        </button>
                        <button type="button" onclick="submitHonorFile()" class="btn btn-sm btn-primary">
                            <i class="ace-icon fa fa-check"></i>
                            提交
                        </button>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <script src="../../static/js/pages/honor.js"></script>
</div>
</body>
</html>